<template>
  <div>
    <el-dialog :title="'查看批注'" width="60%" :visible.sync="isShow" :before-close="handleClose" @open="resetForm" :close-on-click-modal="false" >
      <div>
        <el-form ref="form" :model="form"  label-width="80px">
          <el-form-item label="卦象id" prop="did">
            <el-input v-model="form.did" placeholder="请输入卦象id" readonly/>
          </el-form-item>
          <el-form-item label="卦象名称" prop="dname">
            <el-input v-model="form.dname" :rows="6" type="textarea" placeholder="请输入卦象名称" readonly/>
          </el-form-item>
          <el-form-item label="卦象内容" prop="dtext">
            <el-input v-model="form.dtext" :rows="6" type="textarea" placeholder="请输入卦象内容" readonly/>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button type="primary" @click="handleClose">确 定</el-button>
          <el-button @click="handleClose">取 消</el-button>
        </div>
      </div>
    </el-dialog>
  </div>
</template>

<script>

export default {
  name: "detail",
  props: {
    isShowDialog: Boolean,
    formDataDialog:Object,
  },
  watch: {
    isShowDialog: {
      handler(newVal) {
        this.isShow = newVal
      }
    },
    formDataDialog:{
      handler(newVal) {
        this.form = newVal
      }
    }
  },
  created() {
    this.getList();
  },
  data() {
    return {
      isShow:false,
      form:{},
    }
  },
  methods:{
    getList(){

    },
    handleClose(done) {
      this.$emit('closeDialog', false)
      // done()
    },
    resetForm(){

    },
  }
}
</script>

<style scoped>
.dialog-footer{
  text-align: center;
}
</style>
